# -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.contrib.auth import views as auth_views
from django.contrib import admin

from apps.perfil.forms import UserProfileRegistrationForm
from apps.registration.views import register
from apps.utils.views import *

admin.autodiscover()

handler404 = 'datahandler.apps.utils.views.handler404'
handler500 = 'datahandler.apps.utils.views.handler500'

urlpatterns = patterns('',
    
    url(r'^accounts/register/$', register, {'form_class' : UserProfileRegistrationForm }, name='registration_register'),
    
    ## Apss Urls
    (r'^admin/', include(admin.site.urls)),
    (r'^accounts/', include('apps.registration.urls')),
    (r'^ajax/', include('apps.ajax.urls')),
    (r'^estadisticas/', include('apps.estadisticas.urls')),
    
    ## Amway Apps Urls
    (r'^clientes/', include('apps.amway.urls.clientes.urls')),
    (r'^flujo-caja/', include('apps.amway.urls.caja.urls')),
    (r'^empresarios/', include('apps.amway.urls.empresarios.urls')),    
    (r'^inventario/', include('apps.amway.urls.inventario.urls')),    
    
    (r'^$', auth_views.login, {'template_name': 'index.html'}, 'index'),
    
    #(r'^$', direct_to_template, { 'template': 'index.html' }, 'index'),
    #(r'^pedidos/', include('amway.urls.pedidos.urls')),
    url(r'^googlehostedservice.html$', direct_to_template, { 'template': 'googlehostedservice.html' }, name='verification' ),
    
)
